
#ifndef RECTANGLE_H
#define RECTANGLE_H

// INCLUDES ********************************************************************

#include "Vector2D.h"

// FORWARD DECLARATIONS ********************************************************

// *****************************************************************************

//! Rectangle
//! 
//! Class representing a rectangle, used by drawables to determine
//! their bounds, if touches happened wihthin these bounds etc.

// *****************************************************************************

namespace Meteor
{
    class Rectangle
    {
        public:
            Rectangle();
        
            Rectangle( const float x, 
                       const float y, 
                       const float width, 
                       const float height);
            
            ~Rectangle();
            
            Rectangle( const Rectangle& copy);
            
            Rectangle& operator=( const Rectangle& rhs);
            
            //! check if vector ( point) lies within rect
            const bool Contains( const Vector2D& vector) const;
            
            //! get properties
            const float X() const;
            
            const float Y() const;
            
            const float Width() const;
            
            const float Height() const;
            
            //! set properties
            void SetX( const float newX);
            
            void SetY( const float newY);
            
            void SetWidth( const float newWidth);
            
            void SetHeight( const float newHeight);

        private:
            float mX;
            
            float mY;
            
            float mWidth; 
            
            float mHeight;
        
    }; // end of struct Rectangle

} // end of namespace Meteor

#endif
